﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Kaskelot.SP.UI.Analys.ViewModel
{
    public class Field : INotifyPropertyChanged
    {
        public string NameInQueryBuilder { get; set; }

        public string InternalName { get; set; }

        public string NameInGrid { get; set; }

        public string LookupColumn { get; set; }

        public Type DataType { get; set; }

        public Type DataTypeInGrid { get; set; }

        private bool isChecked;
        public bool Checked
        {
            get
            {
                return this.isChecked;
            }
            set
            {
                if (this.isChecked != value)
                {
                    this.isChecked = value;
                    this.OnPropertyChanged("Checked");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
